]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar: Load interface description from resource
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 12 Feb 2019 18:40:13 +0000 (19:40 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 13 Feb 2019 17:58:36 +0000 (17:58 +0000)
Here's a template string with '/' that escaped commit 94423151b2,
resulting in an xgettext warning when generating the .pot file.

Simply move it into the resource like the other interface descriptions
to make xgettext happy again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/407

data/dbus-interfaces/org.gnome.Shell.CalendarServer.xml [new file with mode: 0644]
data/gnome-shell-dbus-interfaces.gresource.xml
js/ui/calendar.js

diff --git a/data/dbus-interfaces/org.gnome.Shell.CalendarServer.xml b/data/dbus-interfaces/org.gnome.Shell.CalendarServer.xml
new file mode 100644 (file)
index 0000000..c198830
--- /dev/null
@@ -0,0 +1,12 @@
+<node>
+  <interface name="org.gnome.Shell.CalendarServer">
+    <method name="GetEvents">
+      <arg type="x" direction="in" />
+      <arg type="x" direction="in" />
+      <arg type="b" direction="in" />
+      <arg type="a(sssbxxa{sv})" direction="out" />
+    </method>
+    <property name="HasCalendars" type="b" access="read" />
+    <signal name="Changed" />
+  </interface>
+</node>
index ba148ca1f006462817f7f8443178334b768c11ba..3352e0dcd7631406de6cc51bb6330be37ffcc359 100644 (file)
@@ -39,6 +39,7 @@
     <file preprocess="xml-stripblanks">org.gnome.SettingsDaemon.Rfkill.xml</file>
     <file preprocess="xml-stripblanks">org.gnome.SettingsDaemon.Wacom.xml</file>
     <file preprocess="xml-stripblanks">org.gnome.Shell.AudioDeviceSelection.xml</file>
+    <file preprocess="xml-stripblanks">org.gnome.Shell.CalendarServer.xml</file>
     <file preprocess="xml-stripblanks">org.gnome.Shell.Extensions.xml</file>
     <file preprocess="xml-stripblanks">org.gnome.Shell.Introspect.xml</file>
     <file preprocess="xml-stripblanks">org.gnome.Shell.HotplugSniffer.xml</file>
index 28e0d86d2d31418f6c73649f20e4c1a1eeaaee46..cd3e879c4e3391b6217139eb2749ac73e7fe4679 100644 (file)
@@ -9,6 +9,8 @@ const MessageTray = imports.ui.messageTray;
 const Mpris = imports.ui.mpris;
 const Util = imports.misc.util;
 
+const { loadInterfaceXML } = imports.misc.fileUtils;
+
 var MSECS_IN_DAY = 24 * 60 * 60 * 1000;
 var SHOW_WEEKDATE_KEY = 'show-weekdate';
 var ELLIPSIS_CHAR = '\u2026';
@@ -121,19 +123,7 @@ var EmptyEventSource = class EmptyEventSource {
 };
 Signals.addSignalMethods(EmptyEventSource.prototype);
 
-const CalendarServerIface = `
-<node>
-<interface name="org.gnome.Shell.CalendarServer">
-<method name="GetEvents">
-    <arg type="x" direction="in" />
-    <arg type="x" direction="in" />
-    <arg type="b" direction="in" />
-    <arg type="a(sssbxxa{sv})" direction="out" />
-</method>
-<property name="HasCalendars" type="b" access="read" />
-<signal name="Changed" />
-</interface>
-</node>`;
+const CalendarServerIface = loadInterfaceXML('org.gnome.Shell.CalendarServer');
 
 const CalendarServerInfo  = Gio.DBusInterfaceInfo.new_for_xml(CalendarServerIface);